import React from 'react'
import { StyleSheet, Text } from 'react-native';
import IconButton from './IconButton'

const IconTextButton = ({ onPress, name, size, color, text }) => {
  return (
    <>
      <IconButton name={name} onPress={onPress} color={color} size={size} />
      <Text
        style={{
          color: 'white',
          fontWeight: 'bold',
          fontSize: 16,
        }}
      >
        {text}
      </Text>
    </>
  )
}

IconTextButton.defaultProps = {
  color: 'white',
  size: 40,
}

export default IconTextButton

const styles = StyleSheet.create({});
